#include "Machine.h"

int main()
{
    std::cout << "Enter desired number of D-Uints:" << std::endl;

    size_t numUnits;
    std::cin >> numUnits;

    std::cout << "Enter desired number of registers:" << std::endl;
    size_t numRegisters;
    std::cin >> numRegisters;

    std::cout << "Enter desired adder execution time:" << std::endl;
    size_t addTime;
    std::cin >> addTime;

    std::cout << "Enter desired multiplier execution time:" << std::endl;
    size_t mulTime;
    std::cin >> mulTime;

    std::cout << "Enter desired I-u execution time:" << std::endl;
    size_t iuTime;
    std::cin >> iuTime;

    std::cout << "Enter program filename:" << std::endl;
    std::string fName;
    std::cin >> fName;

    TimingDiagram::Machine* mach = new TimingDiagram::Machine(numUnits, numRegisters, addTime, mulTime, iuTime); //Create a new instance of Machine
    mach->loadProgram(fName); //Load program from file
    mach->outputDiagram(); //Generate diagram

    //sleep(1);

    delete mach;

    return 0;
}
